// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIContentPermissionPrompt.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// Interface provides the request type and its access.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("ef4db3b8-ca9c-4b1d-8f81-fd88ec32af13")]
	public interface nsIContentPermissionType
	{
		
		/// <summary>
        /// The type of the permission request, such as
        /// "geolocation".
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetTypeAttribute([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aType);
		
		/// <summary>
        /// The access of the permission request, such as
        /// "read".
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetAccessAttribute([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aAccess);
		
		/// <summary>
        /// The array of available options.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIArray GetOptionsAttribute();
	}
	
	/// <summary>
    /// Interface provides the callback type.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("5fb5bb60-7069-11e4-9803-0800200c9a66")]
	public interface nsIContentPermissionRequestCallback
	{
		
		/// <summary>
        /// The callback of the visibility result.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void NotifyVisibility([MarshalAs(UnmanagedType.U1)] bool isVisible);
	}
	
	/// <summary>
    /// Interface provides the way to get the visibility and
    /// the notification.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("f8577124-6a5f-486f-ae04-c5bcae911eb5")]
	public interface nsIContentPermissionRequester
	{
		
		/// <summary>
        /// The function to get the visibility.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetVisibility([MarshalAs(UnmanagedType.Interface)] nsIContentPermissionRequestCallback callback);
		
		/// <summary>
        /// The callback to get the notification of visibility change.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIContentPermissionRequestCallback GetOnVisibilityChangeAttribute();
		
		/// <summary>
        /// The callback to get the notification of visibility change.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetOnVisibilityChangeAttribute([MarshalAs(UnmanagedType.Interface)] nsIContentPermissionRequestCallback aOnVisibilityChange);
	}
	
	/// <summary>
    /// Interface allows access to a content to request
    /// permission to perform a privileged operation such as
    /// geolocation.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("408c8fcd-1420-4aff-94d8-39bf74d79219")]
	public interface nsIContentPermissionRequest
	{
		
		/// <summary>
        /// The array will include the request types. Elements of this array are
        /// nsIContentPermissionType object.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIArray GetTypesAttribute();
		
		/// <summary>
        /// The principal of the permission request.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIPrincipal GetPrincipalAttribute();
		
		/// <summary>
        /// The window or element that the permission request was
        /// originated in.  Typically the element will be non-null
        /// in when using out of process content.  window or
        /// element can be null but not both.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIDOMWindow GetWindowAttribute();
		
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIDOMElement GetElementAttribute();
		
		/// <summary>
        /// The requester to get the required information of
        /// the window.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsIContentPermissionRequester GetRequesterAttribute();
		
		/// <summary>
        /// allow or cancel the request
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Cancel();
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Allow(ref Gecko.JsVal choices);
	}
	
	/// <summary>
    /// Interface provides a way for the application to handle
    /// the UI prompts associated with geo position.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("F72DE90D-E954-4E69-9A61-917303029301")]
	public interface nsIContentPermissionPrompt
	{
		
		/// <summary>
        /// Called when a request has been made to access
        /// privileged content apis
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Prompt([MarshalAs(UnmanagedType.Interface)] nsIContentPermissionRequest request);
	}
}
